Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix(theme): change hardcoded hue-3 values for background color to backgr... - #1950

Closed
arshabh wants to merge 3 commits into
angular:masterfrom
arshabh:master
Closed

arshabh wants to merge 3 commits into
angular:masterfrom
arshabh:master

Conversation

@arshabh

@arshabh arshabh commented Mar 18, 2015

Copy link
Copy Markdown
Contributor

fix(theme): change hardcoded hue-3 values for background color to color

Closes: #1450

@ThomasBurleson ThomasBurleson modified the milestone: 0.9.0 Mar 31, 2015
@rschmukler

Copy link
Copy Markdown
Contributor

@arshabh this looks good, but what is actually changing background-color into the proper color? Could you add that functionality?

@arshabh

arshabh commented Apr 3, 2015

Copy link
Copy Markdown
Contributor Author

Hey @rschmukler, take a look at the file theming.js - line no. 363 - function parseRules() takes care of parsing these css rules. It creates a regex by the name simpleVariableRegex which replaces specific hues that have been specified explicitly like {{background-hue-3}} or {{primary-100}}. It also defines a regex by the name hueRegex which looks for eg {{background-color}} or {{primary-contrast}} etc.. and puts in proper color with line no 397.

@rschmukler

Copy link
Copy Markdown
Contributor

@arshabh Right, but usually for background-color it will put in the default hue for that palette. In this case 500. That ends up being a different color than hue-3 (A100), which results in the background color being changed to not white, right?

@arshabh

arshabh commented Apr 6, 2015

Copy link
Copy Markdown
Contributor Author

@rschmukler No that does not seem to be the case - background-color would enable the parser to put in all hues in place i.e. hue-1, hue-2 and hue-3. That is what happens after line no. 397. So the resulting class would look something like this - md-default-theme .md-hue-1, md-default-theme .md-hue-2 and md-default-theme .md-hue-3 - with their background color as per the specified hue. Only .md-default-theme would get the default hue for itself.

@rschmukler

Copy link
Copy Markdown
Contributor

@arshabh the issue is that the default hue color for the background palette is currently 500 which would cause most people's expected white background to turn grey. I've changed the default background palette and will now merge this in.

@rschmukler rschmukler closed this in 0df4b16 Apr 8, 2015
@arshabh

arshabh commented Apr 9, 2015

Copy link
Copy Markdown
Contributor Author

@rschmukler yes, pardon me for not confirming to that in my previous statement - yes the default color would not be white and some thing greyish.

@MicrowaveDev

Copy link
Copy Markdown

Now the same problem on sidenav theme.
Please, fix this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

$mdThemingProvider backgroundPalette does not theme the background

4 participants